package com.lyf.scm.common.enums;

import java.util.ArrayList;
import java.util.List;

/**
 * 直营预测计划_目标与销售计划差异
 *
 * @author wangchlei
 * @date 2020/08/10
 */
public enum SalesPlanDirectlyDifferinEnum {
    /**
     * 销售预测（金额）
     */
    SALES_FORECAST_AMOUNT("sales_forecast_amount", "salesForecastAmount", "销售预测（金额）"),
    /**
     * 销售计划（金额）
     */
    SALES_PLAN_AMOUNT("sales_plan_amount", "salesPlanAmount", "销售计划（金额）"),
    /**
     * 销售目标（金额）
     */
    SALES_TARGET_AMOUNT("sales_target_amount", "salesTargetAmount", "销售目标（金额）"),
    /**
     * 实际销售（金额）
     */
    SALES_ACTUAL_AMOUNT("sales_actual_amount", "salesActualAmount", "实际销售（金额）"),
    /**
     * 销售预测（数量）
     */
    SALES_FORECAST_QTY("sales_forecast_qty", "salesForecastQty", "销售预测（数量）"),
    /**
     * 销售计划（数量）
     */
    SALES_PLAN_QTY("sales_plan_qty", "salesPlanQty", "销售计划（数量）"),
    /**
     * 实际销售（数量）
     */
    SALES_ACTUAL_QTY("sales_actual_qty", "salesActualQty", "实际销售（数量）"),
    /**
     * 实际收货量（数量）
     */
    ACTUAL_RECEIVED_QTY("actual_received_qty", "actualReceivedQty", "实际收货量（数量）"),
    /**
     * 目标达成率（金额）
     */
    TARGET_ACHIEVEMENT_RATE_AMOUNT("target_achievement_rate_amount", "targetAchievementRateAmount", "目标达成率（金额）");
    private String key;
    private String column;
    private String desc;

    SalesPlanDirectlyDifferinEnum(String column, String key, String desc) {
        this.column = column;
        this.key = key;
        this.desc = desc;
    }


    public String getKey() {
        return key;
    }

    public void setKey(String key) {
        this.key = key;
    }

    public String getColumn() {
        return column;
    }

    public void setColumn(String column) {
        this.column = column;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    /**
     * 指标的枚举顺序为excel导出时候指标的顺序(不含GMV)
     *
     * @param
     * @return {@link List<String>}
     **/
    public static List<String> getGeneralTargetsDesc() {
        List<String> targetsDesc = new ArrayList<>();
        for (SalesPlanDirectlyDifferinEnum item : SalesPlanDirectlyDifferinEnum.values()) {
            if (item == SALES_TARGET_AMOUNT || item == TARGET_ACHIEVEMENT_RATE_AMOUNT) {
                continue;
            }
            targetsDesc.add(item.getDesc());
        }
        return targetsDesc;
    }

    /**
     * 指标的枚举顺序为excel导出时候指标的顺序
     *
     * @param
     * @return {@link List<String>}
     **/
    public static List<String> getAllTargetsDesc() {
        List<String> targetsDesc = new ArrayList<>();
        for (SalesPlanDirectlyDifferinEnum item : SalesPlanDirectlyDifferinEnum.values()) {
            targetsDesc.add(item.getDesc());
        }
        return targetsDesc;
    }
}
